package com.hw.dagl.model;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.springframework.web.multipart.commons.CommonsMultipartFile;

@Entity
@Table(name = "SYS_USER", schema = "HWBIGDATA")
public class Sys_User implements java.io.Serializable{
	
	private static final long serialVersionUID = -7940110393927317430L;
	private String yhdh;//	VARCHAR2(32)	N			用户代号
	private String xm;//	VARCHAR2(32)	N			真实姓名
	private String mm;//	VARCHAR2(256)	N			密码
	private String glbm;//VARCHAR2(12)	N			管理部门
	private String sfzmhm;//	VARCHAR2(20)	Y			身份证明号码
	private String ipks;//	VARCHAR2(64)	Y	'0.0.0.0'		登录IP起始
	private String ipjs;//	VARCHAR2(64)	Y	'0.0.0.0'		登录IP结束
	private Date zhyxq;//	DATE	Y			账户有效�?
	private Date mmyxq;//	DATE	Y			密码有效�?
	private String zt;//	CHAR(1)	N	'1'		1-启用 2-锁定 3-停用
	private String zp;//	VARCHAR2(500)	Y			用户照片
	private Date cjsj;//	DATE	N	SYSDATE		用户创建时间
	private Date scdlsj;//	DATE	Y			用户上次登录时间
	private String scdlip;//	VARCHAR2(200)	Y			上次登录IP
	private String cjr;//	VARCHAR2(32)	Y			用户创建�?
	private String rid;//VARCHAR2(20)	N			角色ID
	private String theme;//主题
	/**
	 * 工作地点（检查站�?
	 */
	private String gzdd;
	//非持久化字段
	private String rname;//	VARCHAR2(50)	N			角色名称
	private String ipks_r;//VARCHAR2(64)	Y	'0.0.0.0'		角色登录IP起始
	private String ipjs_r;//VARCHAR2(64)	Y	'0.0.0.0'		角色登录IP结束
	private Date jsyxq;//	DATE	Y			角色有效�?
	private String bmmc;//部门名称
	private CommonsMultipartFile upload_zp;//用户照片 
	private String ssbm;
	private String xbmc;//性别名称
	private String jczmc;//执法服务站名�?
	private String fx;//执法服务站方�?
	private String zdbmmc;//执法服务站所属部�?
	private String yhjsmc;//用户角色名称
	private String sjbm;
	private CommonsMultipartFile upload_yhzp;//用户照片 
	private String fzjg;
	
	
	public String getFzjg() {
		return fzjg;
	}
	public void setFzjg(String fzjg) {
		this.fzjg = fzjg;
	}
	public String getSjbm() {
		return sjbm;
	}
	public void setSjbm(String sjbm) {
		this.sjbm = sjbm;
	}
	private String shqx;//审核权限
	
	public String getShqx() {
		return shqx;
	}
	public void setShqx(String shqx) {
		this.shqx = shqx;
	}
	@Id
	@Column(name = "YHDH", nullable = false, length = 32)
	public String getYhdh() {
		return yhdh;
	}
	public void setYhdh(String yhdh) {
		this.yhdh = yhdh;
	}
	
	public String getSsbm() {
		return ssbm;
	}
	public void setSsbm(String ssbm) {
		this.ssbm = ssbm;
	}
	@Column(name = "XM", nullable = false, length = 32)
	public String getXm() {
		return xm;
	}
	public void setXm(String xm) {
		this.xm = xm;
	}
	@Column(name = "MM", nullable = false, length = 256)
	public String getMm() {
		return mm;
	}
	public void setMm(String mm) {
		this.mm = mm;
	}
	@Column(name = "GLBM", nullable = false, length = 12)
	public String getGlbm() {
		return glbm;
	}
	public void setGlbm(String glbm) {
		this.glbm = glbm;
	}
	@Column(name = "SFZMHM", length = 20)
	public String getSfzmhm() {
		return sfzmhm;
	}
	public void setSfzmhm(String sfzmhm) {
		this.sfzmhm = sfzmhm;
	}
	@Column(name = "IPKS", length = 64)
	public String getIpks() {
		if(ipks==null)
			ipks="0.0.0.0";
		return ipks;
	}
	public void setIpks(String ipks) {
		this.ipks = ipks;
	}
	@Column(name = "IPJS", length = 64)
	public String getIpjs() {
		if(ipjs==null)
			ipjs="0.0.0.0";
		return ipjs;
	}
	public void setIpjs(String ipjs) {
		this.ipjs = ipjs;
	}
	@Temporal(TemporalType.DATE)
	@Column(name = "ZHYXQ", nullable = true)
	public Date getZhyxq() {
		return zhyxq;
	}
	public void setZhyxq(Date zhyxq) {
		this.zhyxq = zhyxq;
	}
	@Temporal(TemporalType.DATE)
	@Column(name = "MMYXQ", nullable = true)
	public Date getMmyxq() {
		return mmyxq;
	}
	public void setMmyxq(Date mmyxq) {
		this.mmyxq = mmyxq;
	}
	@Column(name = "ZT", nullable = false, length = 1)
	public String getZt() {
		return zt;
	}
	public void setZt(String zt) {
		this.zt = zt;
	}
	@Column(name = "ZP", length = 500)
	public String getZp() {
		return zp;
	}
	public void setZp(String zp) {
		this.zp = zp;
	}
	@Temporal(TemporalType.DATE)
	@Column(name = "CJSJ", nullable = false)
	public Date getCjsj() {
		return cjsj;
	}
	public void setCjsj(Date cjsj) {
		this.cjsj = cjsj;
	}
	@Temporal(TemporalType.DATE)
	@Column(name = "SCDLSJ")
	public Date getScdlsj() {
		return scdlsj;
	}
	public void setScdlsj(Date scdlsj) {
		this.scdlsj = scdlsj;
	}
	@Column(name = "SCDLIP", length = 200)
	public String getScdlip() {
		return scdlip;
	}
	public void setScdlip(String scdlip) {
		this.scdlip = scdlip;
	}
	@Column(name = "CJR", length = 32)
	public String getCjr() {
		return cjr;
	}
	public void setCjr(String cjr) {
		this.cjr = cjr;
	}
	@Column(name = "RID", nullable = false, length = 20)
	public String getRid() {
		return rid;
	}
	public void setRid(String rid) {
		this.rid = rid;
	}
	@Column(name = "GZDD", length = 20)
	public String getGzdd() {
		return this.gzdd;
	}

	public void setGzdd(String gzdd) {
		this.gzdd = gzdd;
	}
	
	@Transient
	public String getRname() {
		return rname;
	}
	public void setRname(String rname) {
		this.rname = rname;
	}
	@Transient
	public String getIpks_r() {
		return ipks_r;
	}
	public void setIpks_r(String ipks_r) {
		this.ipks_r = ipks_r;
	}
	@Transient
	public String getIpjs_r() {
		return ipjs_r;
	}
	public void setIpjs_r(String ipjs_r) {
		this.ipjs_r = ipjs_r;
	}
	@Transient
	public Date getJsyxq() {
		return jsyxq;
	}
	public void setJsyxq(Date jsyxq) {
		this.jsyxq = jsyxq;
	}
	@Transient
	public String getBmmc() {
		return bmmc;
	}
	public void setBmmc(String bmmc) {
		this.bmmc = bmmc;
	}
	
	@Column(name = "THEME", length = 100)
	public String getTheme() {
		return theme;
	}
	public void setTheme(String theme) {
		this.theme = theme;
	}
	@Transient
	public String getZhyxqStr() {
		if(zhyxq!=null){
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			return sdf.format(zhyxq);
		}
		return "";
	}
	@Transient
	public String getMmyxqStr() {
		if(mmyxq!=null){
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			return sdf.format(mmyxq);
		}
		return "";
	}
	@Transient
	public String getCjsjStr() {
		if(cjsj!=null){
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			return sdf.format(cjsj);
		}
		return "";
	}
	@Transient
	public String getScdlsjStr() {
		if(scdlsj!=null){
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			return sdf.format(scdlsj);
		}
		return "";
	}
	@Transient
	public String getJsyxqStr() {
		if(jsyxq!=null){
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			return sdf.format(jsyxq);
		}
		return "";
	}
	public CommonsMultipartFile getUpload_zp() {
		return upload_zp;
	}
	public void setUpload_zp(CommonsMultipartFile upload_zp) {
		this.upload_zp = upload_zp;
	}
	public String getXbmc() {
		return xbmc;
	}
	public void setXbmc(String xbmc) {
		this.xbmc = xbmc;
	}
	public String getJczmc() {
		return jczmc;
	}
	public void setJczmc(String jczmc) {
		this.jczmc = jczmc;
	}
	public String getFx() {
		return fx;
	}
	public void setFx(String fx) {
		this.fx = fx;
	}
	public String getZdbmmc() {
		return zdbmmc;
	}
	public void setZdbmmc(String zdbmmc) {
		this.zdbmmc = zdbmmc;
	}
	public String getYhjsmc() {
		return yhjsmc;
	}
	public void setYhjsmc(String yhjsmc) {
		this.yhjsmc = yhjsmc;
	}
	public CommonsMultipartFile getUpload_yhzp() {
		return upload_yhzp;
	}
	public void setUpload_yhzp(CommonsMultipartFile upload_yhzp) {
		this.upload_yhzp = upload_yhzp;
	}
	
	
	
}
